home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / IDE / SUBARTIC / RELEASE.ZIP / sub_arctic / lib / interactor.java < prev    next >
Encoding:
Java Source  |  1996-10-04  |  81.8 KB  |  2,055 lines

  1.  
  2. package sub_arctic.lib;
  3.  
  4. import sub_arctic.input.pick_collector;
  5.  
  6. import sub_arctic.constraints.constraint;
  7. import sub_arctic.constraints.std_constraint_consts;
  8. import sub_arctic.constraints.std_ext_constraint;
  9. import sub_arctic.constraints.value_provider;
  10. import sub_arctic.constraints.value_consumer;
  11. import sub_arctic.constraints.provider_part_ref;
  12.  
  13. import sub_arctic.output.drawable;
  14.  
  15. import java.util.Vector;
  16. import java.awt.Component;
  17. import java.awt.Point;
  18. import java.awt.Dimension;
  19. import java.awt.Rectangle;
  20.  
  21. /** 
  22.  * This interface provides the API for all interactive objects that appear
  23.  * on the screen and/or accept input.  Currently all interactor objects
  24.  * in the system are implemented by subclasses of the base_interactor 
  25.  * class.  See that class for addition common methods and for information
  26.  * about defaults.<p>  
  27.  * 
  28.  * The API for interactors covers basic capabilities in 10 areas: 
  29.  * <ul>
  30.  * <li> geometry management, 
  31.  * <li> coordinate system 
  32.  * <li> transformations, 
  33.  * <li> hierarchy management, 
  34.  * <li> traversal support, 
  35.  * <li> layout, 
  36.  * <li> picking, 
  37.  * <li> object status, 
  38.  * <li> output, 
  39.  * <li> user information, and 
  40.  * <li>debugging support.  
  41.  * </ul>
  42.  *
  43.  * See the user's manual for conceptual material related to each area 
  44.  * (each of these areas is covered by a sub-section of the user's manual) and 
  45.  * see the methods of base_interactor for additional  details of each supported 
  46.  * routine.<p>
  47.  * 
  48.  * Note: due to limitations on some (most?) platforms that do not allow for
  49.  * protected methods in interfaces, a number of routines here (and in the 
  50.  * interactor interface) that should be protected, are currently public.
  51.  * These are marked by comments in the code, and will be reverted to protected
  52.  * as soon as enough platforms allow.<p>
  53.  *
  54.  * @author Scott Hudson
  55.  */
  56. public interface interactor extends interactor_consts, std_constraint_consts,
  57.                     value_provider, value_consumer {
  58.  
  59.   /*---------------------------------------------------------------------*/
  60.   /* Basic object geometry */
  61.   /*---------------------------------------------------------------------*/
  62.  
  63.   /** 
  64.    * Position of the top-left corner of this object in the parent coordinate
  65.    * system.  If either coordinate is controlled by a constraint, it will be
  66.    * brought up to date before this value is returned.
  67.    * @return Point the position of the object.
  68.    */
  69.   public Point pos();
  70.  
  71.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  72.  
  73.   /** 
  74.    * X position of the top-left corner of this object in the parent coordinate
  75.    * system.  If this coordinate is controlled by a constraint, it will be
  76.    * brought up to date before this value is returned.
  77.    * @return int the x position of the object.
  78.    */
  79.   public int x();
  80.  
  81.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  82.  
  83.   /** 
  84.    * Y position of the top-left corner of this object in the parent coordinate
  85.    * system.  If this coordinate is controlled by a constraint, it will be
  86.    * brought up to date before this value is returned.
  87.    * @return int the y position of the object.
  88.    */
  89.   public int y();
  90.  
  91.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  92.  
  93.   /** 
  94.    * Size of the object.  If either the width or height of the object is
  95.    * controlled by a constraint, it will be brought up to date before this
  96.    * value is returned.
  97.    * @return Dimension the size of the object.
  98.    */
  99.   public Dimension size();
  100.  
  101.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  102.  
  103.   /** 
  104.    * Width of the object.  If this value is controlled by a constraint, it will
  105.    * be brought up to date before being returned.
  106.    * @return int the width of the object.
  107.    */
  108.   public int w();
  109.  
  110.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  111.  
  112.   /**
  113.    * Height of the object.  If this value is controlled by a constraint, it
  114.    * will be brought up to date before being returned.
  115.    * @return int the height of the object.
  116.    */
  117.   public int h();
  118.  
  119.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  120.  
  121.   /**
  122.    * Bounding rectangle of the object (in parent's coordinate system).
  123.    * @return Rectangle the bounding rectangle of the object.
  124.    */
  125.   public Rectangle bound();
  126.  
  127.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  128.  
  129.   /**
  130.    * Indicate if the object considers itself visible.  If a constraint is
  131.    * attached the value will be brought up-to-date with respect to the
  132.    * constraint first.
  133.    * @return boolean the visibility status of the object
  134.    */
  135.   public boolean visible();
  136.  
  137.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  138.  
  139.   /**
  140.    * Indicate if object is enabled. If a constraint is attached the value
  141.    * will be brought up-to-date with respect to the constraint first.<p>
  142.    *
  143.    * Note: currently setting an object disabled will keep it from being
  144.    * picked by the normal picking mechanism.  This will (normally) disable
  145.    * positional inputs and as a side effect most focus based input (unless the
  146.    * the object is already the focus).  However, since enabled status was
  147.    * added after many of the core interactor classes were created, for the
  148.    * most part the interactors in the library do not yet properly reflect the
  149.    * enable/disable status in their visual appearance.  This is an important
  150.    * deficiency which we hope to correct in future releases.
  151.    *
  152.    * @return boolean the enable status of the interactor.
  153.    */
  154.   public boolean enabled();
  155.  
  156.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  157.   /* STYLECHANGE_IGNORE_START */
  158.   // xx shouldn't that be styleChangeIgnoreStart (leave the identifiers alone!)
  159.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  160.  
  161.   /**
  162.    * Return the value of part_a.  Part_a is a generic value that may be
  163.    * maintained by an interactor to represent some specific semantically
  164.    * meaningful part of its state that it wants to make available for use
  165.    * in the (lightweight) constraint system.  For example, sliders make
  166.    * their "thumb value" available as part_a. Here in the base class,
  167.    * part_a is not implemented (it is intrinsically constrained to 0).
  168.    *
  169.    * @see sub_arctic.lib.interactor_with_parts
  170.    * @see sub_arctic.lib.parent_with_parts
  171.    * @return int the value of part_a (after constraint evaluation if necessary).
  172.    */
  173.   public int part_a();
  174.  
  175.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  176.  
  177.   /**
  178.    * Return the value of part_b.  Part_b is a generic value that may be
  179.    * maintained by an interactor to represent some specific semantically
  180.    * meaningful part of its state that it wants to make available for use
  181.    * in the (lightweight) constraint system.  For example, sliders make
  182.    * their "thumb value" available as part_b. Here in the base class,
  183.    * part_b is not implemented (it is intrinsically constrained to 0).
  184.    *
  185.    * @see sub_arctic.lib.interactor_with_parts
  186.    * @see sub_arctic.lib.parent_with_parts
  187.    * @return int the value of part_b (after constraint evaluation if necessary).
  188.    */
  189.   public int part_b();
  190.  
  191.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  192.  
  193.   /**
  194.    * Get the specified component (X, Y, W, or H) or of object's geometry. This
  195.    * also now works for VISIBLE, ENABLED, PART_A, and PART_B.
  196.    * @param what_code part number whose value is being requested.
  197.    * @return int the value of the requested part (after brining any attached
  198.    *             constraints up-to-date).
  199.    */
  200.   public int get_part(int what_code) ;
  201.  
  202.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  203.  
  204.   /**
  205.    * Set position of this object in parent coordinate system.
  206.    *
  207.    * @param int yv y coordinate of the position.
  208.    * @param int xv x coordinate of the position.
  209.    */
  210.   public void set_pos(int xv, int yv) ;
  211.  
  212.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  213.  
  214.   /**
  215.    * Set position of this object in parent coordinate system.
  216.    *
  217.    * @param Point p the new position.
  218.    */
  219.   public void set_pos(Point p) ;
  220.  
  221.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  222.  
  223.   /**
  224.    * Set x component of position in parent coordinate system.
  225.    * @param int v the new value for x.
  226.    */
  227.   public void set_x(int v) ; 
  228.  
  229.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  230.  
  231.   /**
  232.    * Set y component of position in parent coordinate system.
  233.    * @param int v the new value for y.
  234.    */
  235.   public void set_y(int v) ;
  236.  
  237.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  238.  
  239.   /**
  240.    * Set the size of the object.
  241.    * @param int wv the new value for w.
  242.    * @param int hv the new value for h.
  243.    */
  244.   public void set_size(int wv, int hv) ;
  245.  
  246.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  247.  
  248.   /**
  249.    * Set width of object.
  250.    * @param int v the new value for y.
  251.    */
  252.   public void set_w(int v) ;
  253.  
  254.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  255.  
  256.   /**
  257.    * Set height of object.
  258.    * @param int v the new value for the height.
  259.    */
  260.   public void set_h(int v) ;
  261.  
  262.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  263.  
  264.   /**
  265.    * Set the visibility of the interactor.
  266.    * @param boolean v the new visibility status.
  267.    */
  268.   public void set_visible(boolean v) ;
  269.  
  270.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  271.  
  272.   /**
  273.    * Set the enabled status of the interactor.
  274.    * @param boolean v new value of enabled.
  275.    */
  276.   public void set_enabled(boolean v) ;
  277.  
  278.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  279.  
  280.   /**
  281.    * Set part_a of object.  If part is controlled by a constraint, an
  282.    * exception is thrown.<p>
  283.    *
  284.    * @param int v the new value for part_a
  285.    */
  286.   public void set_part_a(int v) ;
  287.  
  288.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  289.  
  290.   /**
  291.    * Set part_b of object.  If part is controlled by a constraint, an
  292.    * exception is thrown.<p>
  293.    *
  294.    * @param int v the new value for part_b
  295.    */
  296.   public void set_part_b(int v) ;
  297.  
  298.  
  299.   /*---------------------------------------------------------------------*/
  300.   /* Coordinate system transformations */
  301.   /*---------------------------------------------------------------------*/
  302.  
  303.   /**
  304.    * Transform a point in the local coordinate space into the global space
  305.    * (that is the coordinate system of the top_level object which roots the
  306.    * interactor tree this object is in).
  307.    *
  308.    * @param int xv x coordinate of point to transform.
  309.    * @param int yv y coordinate of point to transform.
  310.    * @return Point resulting point.
  311.    */
  312.   public Point local_to_global(int xv, int yv);
  313.  
  314.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  315.  
  316.   /**
  317.    * Transform a point in the local coordinate space into the global space
  318.    * (that is the coordinate system of the top_level object which roots the
  319.    * interactor tree this object is in).
  320.    *
  321.    * @param Point local_pt point to transform.
  322.    * @return Point resulting point.
  323.    */
  324.   public Point local_to_global(Point local_pt);
  325.  
  326.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  327.  
  328.   /**
  329.    * Transform a point in global coordinate space (that is the coordinate
  330.    * system of the top_level object which roots the interactor tree this
  331.    * object is in) into the local space of the object.
  332.    *
  333.    * @param int xv x coordinate of point to transform.
  334.    * @param int yv y coordinate of point to transform.
  335.    * @return Point resulting point.
  336.    */
  337.   public Point global_to_local(int xv, int yv);
  338.  
  339.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  340.  
  341.   /**
  342.    * Transform a point in global coordinate space (that is the coordinate
  343.    * system of the top_level object which roots the interactor tree this
  344.    * object is in) into the local space of the object.
  345.    *
  346.    * @param Point global_pt point to transform.
  347.    * @return Point resulting point.
  348.    */
  349.   public Point global_to_local(Point global_pt);
  350.  
  351.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  352.  
  353.   /**
  354.    * Transform a point from parent's coordinate space to local coordinates of
  355.    * this object.
  356.    *
  357.    * @param int xv x coordinate of point to transform.
  358.    * @param int yv y coordinate of point to transform.
  359.    * @return Point resulting point.
  360.    */
  361.   public Point into_local(int xv, int yv);
  362.  
  363.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  364.  
  365.   /**
  366.    * Transform a point from parent's coordinate space to local coordinates of
  367.    * this object.
  368.    *
  369.    * @param Point parent_pt point to transform.
  370.    * @return Point resulting point.
  371.    */
  372.   public Point into_local(Point parent_pt);
  373.  
  374.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  375.  
  376.   /**
  377.    * Transform an x value from parent's coordinate space to local coords.
  378.    *
  379.    * @param int xv x coordinate of to transform.
  380.    * @return int resulting x coordinate.
  381.    */
  382.   public int x_into_local(int xv);
  383.  
  384.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  385.  
  386.   /**
  387.    * Transform an y value from parent's coordinate space to local coords.
  388.    *
  389.    * @param int yv y coordinate of to transform.
  390.    * @return int resulting y coordinate.
  391.    */
  392.   public int y_into_local(int yv);
  393.  
  394.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  395.  
  396.   /**
  397.    * Transform a local point into the parent's coordinate space.
  398.    *
  399.    * @param Point local_pt point to transform.
  400.    * @return Point resulting point.
  401.    */
  402.   public Point into_parent(Point local_pt);
  403.  
  404.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  405.  
  406.   /**
  407.    * Transform a local point into the parent's coordinate space.
  408.    *
  409.    * @param int xv x coordinate of point to transform.
  410.    * @param int yv y coordinate of point to transform.
  411.    * @return Point resulting point.
  412.    */
  413.   public Point into_parent(int xv, int yv);
  414.  
  415.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  416.  
  417.   /**
  418.    * Transform an x value form local coordinates into the parent's coordinate
  419.    * space.
  420.    *
  421.    * @param int xv x coordinate of to transform.
  422.    * @return int resulting x coordinate.
  423.    */
  424.   public int x_into_parent(int xv);
  425.  
  426.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  427.  
  428.   /**
  429.    * Transform an y value form local coordinates into the parent's coordinate
  430.    * space.
  431.    *
  432.    * @param int yv y coordinate of to transform.
  433.    * @return int resulting y coordinate.
  434.    */
  435.   public int y_into_parent(int yv);
  436.  
  437.   /*---------------------------------------------------------------------*/
  438.   /* Hierarchy management */
  439.   /*---------------------------------------------------------------------*/
  440.  
  441.   /**
  442.    * Return the parent of this interactor.
  443.    * @return interactor the parent of this interactor or null if this object
  444.    *                    is an orphan or is a top_level (root) interactor.
  445.    */
  446.   public interactor parent();
  447.  
  448.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  449.  
  450.   /**
  451.    * Set the parent of this interactor. <p>
  452.    *
  453.    * <b>Warning</b>: this method should be protected (but isn't since various
  454.    * implementations don't allow protected in interfaces).  This method should
  455.    * not be invoked from "outside the system".  Always use the normal child
  456.    * manipulation routines instead.<p>
  457.    *
  458.    * @param interactor par new parent for this object.
  459.    */
  460.   public void set_parent(interactor par) ;
  461.  
  462.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  463.  
  464.   /**
  465.    * Retrieve the top_level interactor (if any) that this object is installed
  466.    * (perhaps several levels down) under.  This top_level interactor provides
  467.    * the "global" coordinate space for this interactor.  Null is returned if
  468.    * this object is not currently installed somewhere under a top_level
  469.    * interactor.<p>
  470.    *
  471.    * @return top_level the top_level object we are installed under or null if
  472.    *                   there is no such object.
  473.    */
  474.   public top_level get_top_level();
  475.  
  476.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  477.  
  478.   /**
  479.    * Retrieve the AWT component that this sub_arctic object is drawn within.
  480.    * If this object is not part of an active interface, null will be returned.
  481.    * <p>
  482.    * @result Component the AWT component that this sub_arctic object is drawn
  483.    *                   within or null if the object is "floating".
  484.    */
  485.   public Component get_awt_component();
  486.  
  487.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  488.  
  489.   /**
  490.    * Return the child index of this interactor (within its parent).
  491.    * This value is obviously not going to be correct for orphan objects.
  492.    * @return int index of this interactor within its parent's child list.
  493.    */
  494.   public int child_index();
  495.  
  496.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  497.  
  498.   /**
  499.    * Set the child index of this interactor (within its parent). <p>
  500.    *
  501.    * <b>Warning</b>: this method should be protected (but isn't since various
  502.    * implementations don't allow protected in interfaces).  This method should
  503.    * not be invoked except from the within the normal child manipulation
  504.    * routines.Always use those routines instead.<p>
  505.    *
  506.    * @param int indx the new index of the child.
  507.    */
  508.   public void set_child_index(int indx);
  509.  
  510.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  511.  
  512.   /**
  513.    * Return the previous sibling of this object (or null if there is none).
  514.    * @return interactor the child before this one in its parent's child list or
  515.    *                    null if there is no such object.
  516.    */
  517.   public interactor prev_sibling();
  518.  
  519.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  520.  
  521.   /**
  522.    * Return the next sibling of this object (or null if there is none).
  523.    * @return interactor the child after this one in its parent's child list or
  524.    *                    null if there is no such object.
  525.    */
  526.   public interactor next_sibling();
  527.  
  528.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  529.  
  530.   /**
  531.    * Indicate whether this interactor supports children.  Interactors that
  532.    * support children will have their SUPPORTS_CHILDREN flag set.
  533.    * @return boolean indicating whether this object supports children.
  534.    */
  535.   public boolean supports_children();
  536.  
  537.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  538.  
  539.   /**
  540.    * Indicate whether this interactor uses a fixed set of children.  This is
  541.    * done if the interactor assigns fixed roles/meanings to particular
  542.    * children, or for some other reason limits its total number of children.
  543.    * If this is not set, then the child list is expandable and the system
  544.    * will move entries over to fill in null children (although you cannot rely
  545.    * on this behavior since it is possible to explicitly set a child at a
  546.    * given index to null and sneak nulls into the child list in other ways).
  547.    * If this is set, then removed children will be set to null, and the child
  548.    * list will not be otherwise modified.  In addition, if this is set, then
  549.    * operations that would normally reorder children throw an exception
  550.    * instead.  An object which uses fixed children will have its
  551.    * FIXED_CHILDREN flag set.
  552.    *
  553.    * @return boolean indicating whether this object supports fixed children.
  554.    */
  555.   public boolean fixed_children();
  556.  
  557.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  558.  
  559.   /**
  560.    * Indicate the number of children this interactor currently has.  For
  561.    * interactors with fixed children, the interactor will always have this
  562.    * this number, hence it is also the maximum number of children.
  563.    * Interactors that do not support children always return 0.  Note: there
  564.    * may be null children in the child list but they are counted as children
  565.    * here.
  566.    *
  567.    * @return int number of slots in this object's child list.
  568.    */
  569.   public int num_children();
  570.  
  571.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  572.  
  573.   /**
  574.    * Return the child at the given index int the child list (whose first
  575.    * element is at index 0).  If the index given is beyond the range of the
  576.    * current child list, or the interactor does not support children, then
  577.    * null is returned.  Requests for negative children cause an exception.
  578.    * Note that child lists may contain null children.
  579.    *
  580.    * @param int i the index of the requested child.
  581.    * @return interactor the child object at the requested index.
  582.    */
  583.   public interactor child(int i) ;
  584.  
  585.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  586.  
  587.  
  588.   /**
  589.    * Set the child at the given index replacing any child that was previously
  590.    * there.  The child list will be expanded as necessary to accommodate the
  591.    * given child.  If the child list is expanded, missing children will be
  592.    * set to null.
  593.    *
  594.    * @param int        at_indx   position in the child list to replace.
  595.    * @param interactor chld      the child object to place at that position.
  596.    */
  597.   public void set_child(int at_indx, interactor chld) ;
  598.  
  599.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  600.  
  601.   /**
  602.    * Add a child to the end of the child list.
  603.    * @param interactor chld the child to add.
  604.    */
  605.   public void add_child(interactor chld) ;
  606.  
  607.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  608.  
  609.   /**
  610.    * Insert a child at the given location, moving current children at or
  611.    * after that index further down in the list.
  612.    */
  613.   public void insert_child(int at_indx, interactor chld) ;
  614.  
  615.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  616.  
  617.   /** Remove the child found at the given index and return it.  For
  618.    *  interactors with fixed children, the child slot at the index is set
  619.    *  to null.  For other interactors, later children are moved over in the
  620.    *  list to fill in the gap.
  621.    *
  622.    * @param int at_indx the index to remove the child from.
  623.    */
  624.   public interactor remove_child(int at_indx) ;
  625.  
  626.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  627.  
  628.   /**
  629.    * Remove the given child from the child list.  For interactors with
  630.    * fixed children, the child slot is set to null.  For other interactors,
  631.    * later children are moved up in the list to fill in the gap.  If the
  632.    * child is not in the child list, nothing happens.
  633.    *
  634.    * @param interactor the_child the child to be removed.
  635.    */
  636.   public void remove_child(interactor the_child) ;
  637.  
  638.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  639.  
  640.   /**
  641.    * Find the given child in the child list and return its index.  If the
  642.    * child is no in the child list -1 is returned.
  643.    *
  644.    * @param interactor the_child the child we are searching for.
  645.    * @return int the index of that child in the child list or -1 if the child
  646.    *             is not found.
  647.    */
  648.   public int find_child(interactor the_child) ;
  649.  
  650.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  651.  
  652.   /**
  653.    * Move the child currently at the given index in the child list to the
  654.    * top in drawing order (which is last in the list).
  655.    *
  656.    * @param int chld_indx the index of the child to move.
  657.    */
  658.   public void move_child_to_top(int chld_indx) ;
  659.  
  660.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  661.  
  662.   /** Move the given child to the top of the child list in drawing order
  663.    *  (which is last in the list).  If the child is not in the list, nothing
  664.    *  happens.
  665.    *
  666.    * @param interactor the_child the child to move.
  667.    */
  668.   public void move_child_to_top(interactor the_child) ;
  669.  
  670.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  671.  
  672.   /**
  673.    * Move the child currently at the given index in the child list to the
  674.    * bottom in drawing order (which is first in the list).
  675.    *
  676.    * @param int chld_indx the index of the child to move.
  677.    */
  678.   public void move_child_to_bottom(int chld_indx) ;
  679.  
  680.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  681.  
  682.   /**
  683.    * Move the given child to the bottom of the child list in drawing order
  684.    * (which is first in the list).  If the child is not in the list, nothing
  685.    * happens.
  686.    *
  687.    * @param interactor the_child the child to move.
  688.    */
  689.   public void move_child_to_bottom(interactor the_child) ;
  690.  
  691.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  692.  
  693.   /**
  694.    * Move the child currently at the given index in the child list up one
  695.    * position in drawing order (which is one position further into the list).
  696.    *
  697.    * @param int chld_indx the index of the child to move.
  698.    */
  699.   public void move_child_upward(int chld_indx) ;
  700.  
  701.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  702.  
  703.   /**
  704.    * Move the given child up one position in drawing order of the child list
  705.    * (which is later in the list).  If the child is not in the list, nothing
  706.    * happens.
  707.    *
  708.    * @param interactor the_child the child to move.
  709.    */
  710.   public void move_child_upward(interactor the_child) ;
  711.  
  712.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  713.  
  714.   /**
  715.    * Move the child currently at the given index in the child list down one
  716.    * position in drawing order (which is one position earlier in the list).
  717.    *
  718.    * @param int chld_indx the index of the child to move.
  719.    */
  720.   public void move_child_downward(int chld_indx) ;
  721.  
  722.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  723.  
  724.   /**
  725.    * Move the given child down one position in drawing order of the child list
  726.    * (which is earlier in the list).  If the child is not in the list, nothing
  727.    * happens.
  728.    *
  729.    * @param interactor the_child the child to move.
  730.    */
  731.   public void move_child_downward(interactor the_child) ;
  732.  
  733.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  734.  
  735.   /**
  736.    * Move this object to the top of its parent's drawing order (last in
  737.    * its child list).
  738.    */
  739.   public void move_to_top() ;
  740.  
  741.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  742.  
  743.   /**
  744.    * Move this object to the bottom of its parent's drawing order (first in
  745.    * its child list).
  746.    */
  747.   public void move_to_bottom() ;
  748.  
  749.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  750.  
  751.   /**
  752.    * Move this object one position higher in its parent's drawing order
  753.    * (which is one position further into its child list).
  754.    */
  755.   public void move_upward() ;
  756.  
  757.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  758.  
  759.   /**
  760.    * Move this object one position lower in its parent's drawing order
  761.    * (which is one position earlier in its child list).
  762.    */
  763.   public void move_downward() ;
  764.  
  765.   /*---------------------------------------------------------------------*/
  766.   /* Layout */
  767.   /*---------------------------------------------------------------------*/
  768.  
  769.   /**
  770.    * Indicate which parts (coordinates/sizes/values) of this object are
  771.    * intrinsically constrained by the internals of the object.  For, example
  772.    * an icon object with a fixed size image would intrinsically constrain
  773.    * its width and height. The result is reported as an integer formed from
  774.    * or-ing together zero or more of the constants:  X, Y, W, H, VISIBLE,
  775.    * ENABLED, PART_A or PART_B (for the icon described above that would be
  776.    * W | H).
  777.    *
  778.    * @return int bitset indicating which parts of the object are intrinsically
  779.    *             constrained.
  780.    */
  781.   public int intrinsic_constraints();
  782.  
  783.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  784.  
  785.   /**
  786.    * Indicate which parts (coordinates/sizes/values) of this object are
  787.    * currently constrained.  This always includes the intrinsic constraints,
  788.    * but  may also indicate other constraints that have been applied to the
  789.    * object.  The result is reported as an integer formed from or-ing
  790.    * together zero or more of the constants: X, Y, W, H, VISIBLE, ENABLED,
  791.    * PART_A and PART_B.  Values that are constrained may not be assigned to
  792.    * directly (an exception will be thrown).
  793.    *
  794.    * @param int bitset indicating which parts of the object are constrained.
  795.    */
  796.   public int active_constraints();
  797.  
  798.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  799.  
  800.   /**
  801.    * Indicate whether a specific part is currently constrained.  The query
  802.    * argument should be one of the constants: X, Y, W, H, VISIBLE, ENABLED,
  803.    * PART_A, or PART_B.  Values that are constrained may not be assigned to
  804.    * (an exception will be thrown).
  805.    *
  806.    * @param int coord_code the object part we are enquiring about.
  807.    * @return boolean indicating whether it is constrained.
  808.    */
  809.   public boolean is_constrained(int coord_code);
  810.  
  811.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  812.  
  813.   /**
  814.    * Return a constraint object representing the constraint (if any) attached
  815.    * to the specified part (X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B).
  816.    * @param int coord_code the code for the object part in question.
  817.    * @return constraint the constraint attached to the given part.
  818.    */
  819.   public constraint constraint_on(int coord_code) ;
  820.  
  821.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  822.  
  823.   /**
  824.    * Return a constraint object representing the constraint (if any) attached
  825.    * to x.
  826.    * @return constraint the constraint attached to x.
  827.    */
  828.   public constraint x_constraint();
  829.  
  830.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  831.  
  832.   /**
  833.    * Return a constraint object representing the constraint (if any) attached
  834.    * to y.
  835.    * @return constraint the constraint attached to x.
  836.    */
  837.   public constraint y_constraint();
  838.  
  839.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  840.  
  841.   /**
  842.    * Return a constraint object representing the constraint (if any) attached
  843.    * to w.
  844.    * @return constraint the constraint attached to w.
  845.    */
  846.   public constraint w_constraint();
  847.  
  848.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  849.  
  850.   /**
  851.    * Return a constraint object representing the constraint (if any) attached
  852.    * to h.
  853.    * @return constraint the constraint attached to h.
  854.    */
  855.   public constraint h_constraint();
  856.  
  857.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  858.  
  859.   /**
  860.    * Return a constraint object representing the constraint (if any) attached
  861.    * to visible.
  862.    * @return constraint the constraint attached to visible.
  863.    */
  864.   public constraint visible_constraint();
  865.  
  866.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  867.  
  868.   /**
  869.    * Return a constraint object representing the constraint (if any) attached
  870.    * to enabled.
  871.    * @return constraint the constraint attached to enabled.
  872.    */
  873.   public constraint enabled_constraint();
  874.  
  875.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  876.  
  877.   /**
  878.    * Return a constraint object representing the constraint (if any) attached
  879.    * to part_a.
  880.    * @return constraint the constraint attached to part_a.
  881.    */
  882.   public constraint part_a_constraint();
  883.  
  884.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  885.  
  886.   /**
  887.    * Return a constraint object representing the constraint (if any) attached
  888.    * to part_b.
  889.    * @return constraint the constraint attached to part_a.
  890.    */
  891.   public constraint part_b_constraint();
  892.  
  893.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  894.  
  895.   /**
  896.    * Establish a constraint on the given value (one of X, Y, W, H, VISIBLE,
  897.    * ENABLED, PART_A, or PART_B).  This replaces any constraint currently in
  898.    * place.  However, an attempt to replace an intrinsic constraint will
  899.    * result in an exception.
  900.    *
  901.    * @param int        coord_code   code for the part whose constraint we
  902.    *                                replace.
  903.    * @param constraint a_constraint the constraint to replace it with.
  904.    */
  905.   public void set_constraint(int coord_code, constraint a_constraint) ;
  906.  
  907.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  908.  
  909.   /**
  910.    * Establish an "external" or "heavyweight" constraint on the given value (one
  911.    * of X, Y, W, H, VISIBLE, ENABLED, PART_A, PART_B).  This replaces any
  912.    * constraint currently in place.  However, an attempt to replace an
  913.    * intrinsic constraint will result in an exception.
  914.    *
  915.    * @param int        coord_code   code for the part whose constraint we
  916.    *                                replace.
  917.    * @param constraint a_constraint the constraint to replace it with.
  918.    */
  919.   public void set_constraint(int code, value_provider ext_obj, int ext_part) ;
  920.  
  921.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  922.  
  923.   /**
  924.    * Establish a constraint on the x value of this object.  This
  925.    * replaces any constraint currently in place.  However, an attempt to
  926.    * replace an intrinsic constraint will result in an exception.  Only
  927.    * horizontally oriented constraints can be attached to x (if a vertically
  928.    * oriented value is need, use an external constraint).
  929.    *
  930.    * @param constraint a_constraint the constraint to replace it with.
  931.    */
  932.   public void set_x_constraint(constraint a_constraint) ;
  933.  
  934.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  935.  
  936.   /**
  937.    * Establish an "external" or "heavyweight" constraint on the x value of
  938.    * this object.  This attaches a value exported by a particular part of
  939.    * some value_provider object and replaces any constraint currently in
  940.    * place.  However, an  attempt to replace an intrinsic constraint will
  941.    * result in an exception.
  942.    *
  943.    * @param value_provider ext_obj  the external object providing the value.
  944.    * @param int            ext_part the part number of the part of that object
  945.    *                                providing the value.
  946.    */
  947.   public void set_x_constraint(value_provider ext_obj, int ext_part) ;
  948.  
  949.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  950.  
  951.   /**
  952.    * Establish a standard external constraint on the x value of this object.
  953.    * This replaces any constraint currently in place.  However, an attempt to
  954.    * replace an intrinsic constraint will result in an exception.
  955.    *
  956.    * @param std_ext_constraint ext_cnstr the constraint to attach.
  957.    */
  958.   public void set_x_constraint(std_ext_constraint ext_cnstr) ;
  959.  
  960.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  961.  
  962.   /**
  963.    * Establish a constraint on the y value of this object.  This
  964.    * replaces any constraint currently in place.  However, an attempt to
  965.    * replace an intrinsic constraint will result in an exception.  Only
  966.    * vertically oriented constraints can be attached to y (if a horizontally
  967.    * oriented value is need, use an external constraint).
  968.    *
  969.    * @param constraint a_constraint the constraint to replace it with.
  970.    */
  971.   public void set_y_constraint(constraint a_constraint) ;
  972.  
  973.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  974.  
  975.   /**
  976.    * Establish an "external" or "heavyweight" constraint on the y value of
  977.    * this object.  This attaches a value exported by a particular part of
  978.    * some value_provider object and replaces any constraint currently in
  979.    * place.  However, an  attempt to replace an intrinsic constraint will
  980.    * result in an exception.
  981.    *
  982.    * @param value_provider ext_obj  the external object providing the value.
  983.    * @param int            ext_part the part number of the part of that object
  984.    *                                providing the value.
  985.    */
  986.   public void set_y_constraint(value_provider ext_obj, int ext_part) ;
  987.  
  988.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  989.  
  990.   /**
  991.    * Establish a standard external constraint on the y value of this object.
  992.    * This replaces any constraint currently in place.  However, an attempt to
  993.    * replace an intrinsic constraint will result in an exception.
  994.    *
  995.    * @param std_ext_constraint ext_cnstr the constraint to attach.
  996.    */
  997.   public void set_y_constraint(std_ext_constraint ext_cnstr) ;
  998.  
  999.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1000.  
  1001.   /**
  1002.    * Establish a constraint on the w value of this object.  This
  1003.    * replaces any constraint currently in place.  However, an attempt to
  1004.    * replace an intrinsic constraint will result in an exception.  Only
  1005.    * horizontally oriented constraints can be attached to w (if a vertically
  1006.    * oriented value is need, use an external constraint).
  1007.    *
  1008.    * @param constraint a_constraint the constraint to replace it with.
  1009.    */
  1010.   public void set_w_constraint(constraint a_constraint) ;
  1011.  
  1012.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1013.  
  1014.   /**
  1015.    * Establish an "external" or "heavyweight" constraint on the w value of
  1016.    * this object.  This attaches a value exported by a particular part of
  1017.    * some value_provider object and replaces any constraint currently in
  1018.    * place.  However, an  attempt to replace an intrinsic constraint will
  1019.    * result in an exception.
  1020.    *
  1021.    * @param value_provider ext_obj  the external object providing the value.
  1022.    * @param int            ext_part the part number of the part of that object
  1023.    *                                providing the value.
  1024.    */
  1025.   public void set_w_constraint(value_provider ext_obj, int ext_part) ;
  1026.  
  1027.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1028.  
  1029.   /**
  1030.    * Establish a standard external constraint on the w value of this object.
  1031.    * This replaces any constraint currently in place.  However, an attempt to
  1032.    * replace an intrinsic constraint will result in an exception.
  1033.    *
  1034.    * @param std_ext_constraint ext_cnstr the constraint to attach.
  1035.    */
  1036.   public void set_w_constraint(std_ext_constraint ext_cnstr) ;
  1037.  
  1038.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1039.  
  1040.   /**
  1041.    * Establish a constraint on the h value of this object.  This
  1042.    * replaces any constraint currently in place.  However, an attempt to
  1043.    * replace an intrinsic constraint will result in an exception.  Only
  1044.    * vertically oriented constraints can be attached to h (if a horizontally
  1045.    * oriented value is need, use an external constraint).
  1046.    *
  1047.    * @param constraint a_constraint the constraint to replace it with.
  1048.    */
  1049.   public void set_h_constraint(constraint a_constraint) ;
  1050.  
  1051.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1052.  
  1053.   /**
  1054.    * Establish an "external" or "heavyweight" constraint on the h value of
  1055.    * this object.  This attaches a value exported by a particular part of
  1056.    * some value_provider object and replaces any constraint currently in
  1057.    * place.  However, an  attempt to replace an intrinsic constraint will
  1058.    * result in an exception.
  1059.    *
  1060.    * @param value_provider ext_obj  the external object providing the value.
  1061.    * @param int            ext_part the part number of the part of that object
  1062.    *                                providing the value.
  1063.    */
  1064.   public void set_h_constraint(value_provider ext_obj, int ext_part) ;
  1065.  
  1066.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1067.   /**
  1068.    * Establish a standard external constraint on the h value of this object.
  1069.    * This replaces any constraint currently in place.  However, an attempt to
  1070.    * replace an intrinsic constraint will result in an exception.
  1071.    *
  1072.    * @param std_ext_constraint ext_cnstr the constraint to attach.
  1073.    */
  1074.   public void set_h_constraint(std_ext_constraint ext_cnstr) ;
  1075.  
  1076.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1077.  
  1078.   /** 
  1079.    * Establish a constraint on the visible value of this object.  This 
  1080.    * replaces any constraint currently in place.  However, an attempt to 
  1081.    * replace an intrinsic constraint will result in an exception.  
  1082.    *
  1083.    * @param constraint a_constraint the constraint to replace it with.
  1084.    */
  1085.   public void set_visible_constraint(constraint a_constraint) ;
  1086.  
  1087.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1088.  
  1089.   /** 
  1090.    * Establish an "external" or "heavyweight" constraint on the visible value 
  1091.    * of this object.  This attaches a value exported by a particular part of 
  1092.    * some value_provider object and replaces any constraint currently in 
  1093.    * place.  However, an  attempt to replace an intrinsic constraint will 
  1094.    * result in an exception.  
  1095.    *
  1096.    * @param value_provider ext_obj  the external object providing the value.
  1097.    * @param int            ext_part the part number of the part of that object 
  1098.    *                                providing the value.
  1099.    */
  1100.   public void set_visible_constraint(value_provider ext_obj, int ext_part) ;
  1101.  
  1102.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1103.  
  1104.   /** 
  1105.    * Establish a standard external constraint on the visible value of this 
  1106.    * object.  This replaces any constraint currently in place.  However, an 
  1107.    * attempt to replace an intrinsic constraint will result in an exception.  
  1108.    *
  1109.    * @param std_ext_constraint ext_cnstr the constraint to attach.
  1110.    */
  1111.   public void set_visible_constraint(std_ext_constraint ext_cnstr) ;
  1112.  
  1113.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1114.  
  1115.   /** 
  1116.    * Establish a constraint on the enabled value of this object.  This 
  1117.    * replaces any constraint currently in place.  However, an attempt to 
  1118.    * replace an intrinsic constraint will result in an exception.  
  1119.    *
  1120.    * @param constraint a_constraint the constraint to replace it with.
  1121.    */
  1122.   public void set_enabled_constraint(constraint a_constraint) ;
  1123.  
  1124.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1125.  
  1126.   /** 
  1127.    * Establish an "external" or "heavyweight" constraint on the enabled value 
  1128.    * of this object.  This attaches a value exported by a particular part of 
  1129.    * some value_provider object and replaces any constraint currently in 
  1130.    * place.  However, an  attempt to replace an intrinsic constraint will 
  1131.    * result in an exception.  
  1132.    *
  1133.    * @param value_provider ext_obj  the external object providing the value.
  1134.    * @param int            ext_part the part number of the part of that object 
  1135.    *                                providing the value.
  1136.    */
  1137.   public void set_enabled_constraint(value_provider ext_obj, int ext_part) ;
  1138.  
  1139.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1140.  
  1141.   /** 
  1142.    * Establish a standard external constraint on the enabled value of this 
  1143.    * object.  This replaces any constraint currently in place.  However, an 
  1144.    * attempt to replace an intrinsic constraint will result in an exception.  
  1145.    *
  1146.    * @param std_ext_constraint ext_cnstr the constraint to attach.
  1147.    */
  1148.   public void set_enabled_constraint(std_ext_constraint ext_cnstr) ;
  1149.  
  1150.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1151.  
  1152.   /** 
  1153.    * Establish a constraint on the part_a value of this object.  This 
  1154.    * replaces any constraint currently in place.  However, an attempt to 
  1155.    * replace an intrinsic constraint will result in an exception.  
  1156.    *
  1157.    * @param constraint a_constraint the constraint to replace it with.
  1158.    */
  1159.   public void set_part_a_constraint(constraint a_constraint) ;
  1160.  
  1161.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1162.  
  1163.   /** 
  1164.    * Establish an "external" or "heavyweight" constraint on the part_a value of 
  1165.    * this object.  This attaches a value exported by a particular part of 
  1166.    * some value_provider object and replaces any constraint currently in 
  1167.    * place.  However, an  attempt to replace an intrinsic constraint will 
  1168.    * result in an exception.  
  1169.    *
  1170.    * @param value_provider ext_obj  the external object providing the value.
  1171.    * @param int            ext_part the part number of the part of that object 
  1172.    *                                providing the value.
  1173.    */
  1174.   public void set_part_a_constraint(value_provider ext_obj, int ext_part) ;
  1175.  
  1176.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1177.  
  1178.   /** 
  1179.    * Establish a standard external constraint on the part_a value of this 
  1180.    * object.  This replaces any constraint currently in place.  However, an 
  1181.    * attempt to replace an intrinsic constraint will result in an exception.  
  1182.    *
  1183.    * @param std_ext_constraint ext_cnstr the constraint to attach.
  1184.    */
  1185.   public void set_part_a_constraint(std_ext_constraint ext_cnstr) ;
  1186.  
  1187.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1188.  
  1189.   /** 
  1190.    * Establish a constraint on the part_b value of this object.  This 
  1191.    * replaces any constraint currently in place.  However, an attempt to 
  1192.    * replace an intrinsic constraint will result in an exception.
  1193.    *
  1194.    * @param constraint a_constraint the constraint to replace it with.
  1195.    */
  1196.   public void set_part_b_constraint(constraint a_constraint) ;
  1197.  
  1198.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1199.  
  1200.   /** 
  1201.    * Establish an "external" or "heavyweight" constraint on the part_b value of 
  1202.    * this object.  This attaches a value exported by a particular part of 
  1203.    * some value_provider object and replaces any constraint currently in 
  1204.    * place.  However, an  attempt to replace an intrinsic constraint will 
  1205.    * result in an exception.  
  1206.    *
  1207.    * @param value_provider ext_obj  the external object providing the value.
  1208.    * @param int            ext_part the part number of the part of that object 
  1209.    *                                providing the value.
  1210.    */
  1211.   public void set_part_b_constraint(value_provider ext_obj, int ext_part) ;
  1212.  
  1213.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1214.  
  1215.   /** 
  1216.    * Establish a standard external constraint on the part_b value of this 
  1217.    * object.  This replaces any constraint currently in place.  However, an 
  1218.    * attempt to replace an intrinsic constraint will result in an exception.  
  1219.    *
  1220.    * @param std_ext_constraint ext_cnstr the constraint to attach.
  1221.    */
  1222.   public void set_part_b_constraint(std_ext_constraint ext_cnstr) ;
  1223.  
  1224.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1225.  
  1226.   /**
  1227.    * Indicate which values are currently marked as potentially out of
  1228.    * date with respect to their constraints.  Typically this information
  1229.    * is needed only by the constraint system, since values are generally
  1230.    * brought up to date whenever they are requested.  <p>
  1231.    *
  1232.    * @returns int a bitset indicating the parts of this object which are
  1233.    *              currently marked out-of-date.
  1234.    */
  1235.   public int marked_ood();
  1236.  
  1237.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1238.  
  1239.   /**
  1240.    * Mark the given value as out of date.  This will recursively mark
  1241.    * anything that directly or indirectly depends on the given value. This
  1242.    * should normally only be called by the constraint system, since setting
  1243.    * values via set_*() will automatically call this routine.
  1244.    *
  1245.    * @param int the part to mark out-of-date.  This should be one of the
  1246.    *            values: X, Y, W, H, ENABLED, PART_A, or PART_B.
  1247.    */
  1248.   public void mark_ood(int coord_code) ;
  1249.  
  1250.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1251.  
  1252.   /**
  1253.    * Mark all geometric parts of this object out of date.  This happens for
  1254.    * example when we reparent it.
  1255.    */
  1256.   public void mark_all_ood();
  1257.  
  1258.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1259.  
  1260.   /**
  1261.    * Mark x value and anything that directly or indirectly depends on it as
  1262.    * out-of-date.
  1263.    */
  1264.   public void mark_x_ood();
  1265.  
  1266.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1267.  
  1268.   /**
  1269.    * Mark y value and anything that directly or indirectly depends on it as
  1270.    * out-of-date.
  1271.    */
  1272.   public void mark_y_ood();
  1273.  
  1274.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1275.  
  1276.   /**
  1277.    * Mark w value and anything that directly or indirectly depends on it as
  1278.    * out-of-date.
  1279.    */
  1280.   public void mark_w_ood();
  1281.  
  1282.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1283.  
  1284.   /**
  1285.    * Mark h value and anything that directly or indirectly depends on it as
  1286.    * out-of-date.
  1287.    */
  1288.   public void mark_h_ood();
  1289.  
  1290.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1291.  
  1292.   /** 
  1293.    * Mark visible value and anything that directly or indirectly depends on 
  1294.    * it as out-of-date.
  1295.    */
  1296.   public void mark_visible_ood();
  1297.  
  1298.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1299.  
  1300.   /** 
  1301.    * Mark enabled value and anything that directly or indirectly depends on 
  1302.    * it as out-of-date.
  1303.    */
  1304.   public void mark_enabled_ood();
  1305.  
  1306.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1307.  
  1308.   /** 
  1309.    * Mark part_a value and anything that directly or indirectly depends on it 
  1310.    * as out-of-date.
  1311.    */
  1312.   public void mark_part_a_ood();
  1313.  
  1314.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1315.  
  1316.   /** 
  1317.    * Mark part_b value and anything that directly or indirectly depends on it 
  1318.    * as out-of-date.
  1319.    */
  1320.   public void mark_part_b_ood();
  1321.  
  1322.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1323.  
  1324.   /**
  1325.    * Mark all our geometric parts out-of-date and tell all potentially
  1326.    * dependent objects that all our parts are out-of-date (this gets done
  1327.    * when we move around in the hierarchy).  This affects, x, y, w, and h,
  1328.    * but not visible, enabled, part_a, or part_b.
  1329.    */
  1330.   public void mark_reparented_ood();
  1331.  
  1332.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1333.  
  1334.   /**
  1335.    * Inform the object that the indicated part of a potentially related object
  1336.    * is out-of-date (this is called from ood_inform_all()).  The related
  1337.    * object can be one of OBJCODE_SELF, OBJCODE_PARENT, OBJCODE_SOME_CHILD,
  1338.    * OBJCODE_NEXT_SIBLING, or OBJCODE_PREV_SIBLING, and the indicated part
  1339.    * can  be X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B. <p>
  1340.    *
  1341.    * The nth_child parameter is used only if OBJCODE_SOME_CHILD is passed,
  1342.    * in which case it indicates the index of the child in question.
  1343.    * If parts of this object are actually dependent upon the given part they
  1344.    * are marked out-of-date and the mark out-of-date traversal is continued
  1345.    * recursively from them.  If not, we do nothing.
  1346.    *
  1347.    * @param int from_type the type of object we are being informed by (must be
  1348.    *                      one of OBJCODE_SELF, OBJCODE_PARENT,
  1349.    *                      OBJCODE_SOME_CHILD,  OBJCODE_NEXT_SIBLING, or
  1350.    *                      OBJCODE_PREV_SIBLING).
  1351.    * @param int from_part the part code of the part of that object which is
  1352.    *                      informing us that it is out-of-date.
  1353.    * @param int nth_child if from_type is OBJCODE_SOME_CHILD, this parameter
  1354.    *                      indicates which child it is (otherwise it is ignored).
  1355.    */
  1356.   public void inform_ood(
  1357.     int from_obj_type, 
  1358.     int from_part,
  1359.     int nth_child) ;
  1360.     
  1361.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1362.  
  1363.   /**
  1364.    * Handle a cycle detected in constraints on a given part of this object.
  1365.    * If this routine returns true, then evaluation proceeds.  If this returns
  1366.    * false then, the current value of the attribute (which may have been set
  1367.    * by this routine) is left in place but marked up-to-date.  
  1368.    *
  1369.    * @see sub_arctic.lib.manager#handle_cycle
  1370.    * @param int part_code the part of this object that involves a cycle.
  1371.    * @return boolean indicating whether we should proceed with evaluation.
  1372.    */
  1373.   public boolean handle_cycle(int part_code);
  1374.  
  1375.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1376.  
  1377.   /**
  1378.    * Bring the indicated value up to date with respect to any defining
  1379.    * constraints.  This routine does not typically need to be called
  1380.    * explicitly since normal requests for values do evaluations before
  1381.    * returning.
  1382.    *
  1383.    * @param int coord_code the part whose value should be evaluated.
  1384.    */
  1385.   public void eval(int coord_code) ;
  1386.  
  1387.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1388.  
  1389.   /** Bring x up to date with respect to any defining constraint. */
  1390.   public void eval_x();
  1391.  
  1392.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1393.  
  1394.   /** Bring y up to date with respect to any defining constraint. */
  1395.   public void eval_y();
  1396.  
  1397.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1398.  
  1399.   /** Bring w up to date with respect to any defining constraint. */
  1400.   public void eval_w();
  1401.  
  1402.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1403.  
  1404.   /** Bring h up to date with respect to any defining constraint. */
  1405.   public void eval_h();
  1406.  
  1407.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1408.  
  1409.   /** Bring visible up to date with respect to any defining constraint. */
  1410.   public void eval_visible();
  1411.  
  1412.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1413.  
  1414.   /** Bring enabled up to date with respect to any defining constraint. */
  1415.   public void eval_enabled();
  1416.  
  1417.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1418.  
  1419.   /** Bring part_a up to date with respect to any defining constraint. */
  1420.   public void eval_part_a();
  1421.  
  1422.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1423.  
  1424.   /** Bring part_b up to date with respect to any defining constraint. */
  1425.   public void eval_part_b();
  1426.  
  1427.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1428.  
  1429.   /**
  1430.    * Get the external value provider (if any) associated with the given
  1431.    * part value (X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B).  Returns
  1432.    * null if there is no external provider.
  1433.    *
  1434.    * @param int for_part the part we are asking about.
  1435.    * @return provider_part_ref the external value provider associated with that
  1436.    *                           part, or null if there is none.
  1437.    */
  1438.   public provider_part_ref get_external_constraint(int for_part);
  1439.  
  1440.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1441.  
  1442.   /** Get an up-to-date copy of a particular part value(X, Y, W, H, VISIBLE,
  1443.    *  ENABLED, PART_A, or PART_B).  An Integer object will be returned.
  1444.    *
  1445.    * @param int part_number the part being requested.
  1446.    * @return Object an Integer object containing the value of the requested
  1447.    *                part.
  1448.    */
  1449.    public Object get_value(int part_number) ;
  1450.  
  1451.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1452.  
  1453.   /**
  1454.    * A custom function accessible in the constraint system.  This function
  1455.    * is accessible from the (lightweight) constraint system and can be
  1456.    * overridden by particular subclasses to perform custom computations
  1457.    * associated with that class.  This version is passed a single parameter
  1458.    * value derived from a depended upon object, plus a constant value taken
  1459.    * from the constraint.  <p>
  1460.    *
  1461.    * <b>Important note</b>: for the constraint system to work correctly, this
  1462.    * function must compute its value solely on its parameters and not access
  1463.    * additional information from this object or other objects (since the
  1464.    * attribute constrained to the result of this function will not hear about
  1465.    * changes and be properly updated).
  1466.    *
  1467.    * @param int val1      a value from a depended upon object.
  1468.    * @param int const_val a constant value taken from the constraint.
  1469.    * @returns int the result of evaluating of the function.
  1470.    */
  1471.   public int custom_fun1(int val1, int const_val);
  1472.  
  1473.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1474.  
  1475.   /**
  1476.    * A custom function accessible in the constraint system.  This function
  1477.    * is accessible from the (lightweight) constraint system and can be
  1478.    * overridden by particular subclasses to perform custom computations
  1479.    * associated with that class.  This version is passed two parameter values
  1480.    * derived from a depended upon object, plus a constant value taken from the
  1481.    * constraint. <p>
  1482.    *
  1483.    * <b>Important note</b>: for the constraint system to work correctly, this
  1484.    * function must compute its value solely on its parameters and not access
  1485.    * additional information from this object or other objects (since the
  1486.    * attribute constrained to the result of this function will not hear about
  1487.    * changes and be properly updated).
  1488.    *
  1489.    * @param int val1      a value from a depended upon object.
  1490.    * @param int val2      another value from a depended upon object.
  1491.    * @param int const_val a constant value taken from the constraint.
  1492.    * @returns int the result of evaluating the function.
  1493.    */
  1494.   public int custom_fun2(int val1, int val2, int const_val);
  1495.  
  1496.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1497.  
  1498.   /**
  1499.    * Register something as interested in (dependent on) one of the parts
  1500.    * (X, Y, W, H, VISIBLE, ENABLED, PART_A, or PART_B) of this object.  The
  1501.    * entity registered is a part within a value_consumer object (typically
  1502.    * an external_constraint).  Whenever the part value in question is marked
  1503.    * out-of-date, the value_ood() method is invoked on  each currently
  1504.    * registered  (object,part) pair.
  1505.    *
  1506.    * @param int            on_part_num the part of this object that the
  1507.    *                                   dependency is being attached to.
  1508.    * @param value_consumer dep_obj     the object that is dependent.
  1509.    * @param int            dep_part    the part within that object which is
  1510.    *                                   dependent.
  1511.    */
  1512.   public void attach_dependent(
  1513.     int            on_part_num, 
  1514.     value_consumer dep_obj, 
  1515.     int            dep_part) ;
  1516.  
  1517.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1518.  
  1519.   /**
  1520.    * Remove an (object,part) pair from the dependent (interested in) list
  1521.    * associated with a particular part of this object.
  1522.    *
  1523.    * @param int            on_part_num the part of this object that the
  1524.    *                                   dependency is attached to.
  1525.    * @param value_consumer dep_obj     the object that was dependent.
  1526.    * @param int            dep_part    the part within that object which was
  1527.    *                                   dependent.
  1528.    */
  1529.   public void detach_dependent(
  1530.     int            on_part_num, 
  1531.     value_consumer dep_obj, 
  1532.     int            dep_part) ;
  1533.   
  1534.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1535.  
  1536.   /**
  1537.    * Indicate that a part value (X, Y, W, H, VISIBLE, ENABLED, PART_A, or
  1538.    * PART_B) with an external constraint attached should be marked out-of-date
  1539.    * because something it depends on (externally) is out-of-date.
  1540.    *
  1541.    * @param int            for_part_here part within this object that should be
  1542.    *                                     marked out-of-date.
  1543.    * @param value_provider prov_obj      object that we depend on.
  1544.    * @param int            prov_part     part within that object that is
  1545.    */
  1546.    public void value_ood(
  1547.      int            for_part_here, 
  1548.      value_provider prov_obj, 
  1549.      int            prov_part) ;
  1550.  
  1551.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1552.  
  1553.   /**
  1554.    * Do the constraint evaluation necessary to make sure all visible objects
  1555.    * in the subtree rooted at this object have up-to-date bounds (and other
  1556.    * information) prior to drawing.  This routine implements the "configure"
  1557.    * pass which occurs right before the pass that does the actual drawing.<p>
  1558.    *
  1559.    * <b>Important note</b>: In addition to the work done in the base_interactor
  1560.    * class (which should almost always be done by invoking super() from any 
  1561.    * subclass implementations), each subclass should also be certain to update 
  1562.    * anything which could effect its bounds here, and <b>not</b> in 
  1563.    * draw_self_local(). So for example if the height of an object depends on a 
  1564.    * font that might have changed, the potentially new height must be computed 
  1565.    * and set here and not in draw_self_local().  In general, for things to work 
  1566.    * out right it must be the case that this object's bound is correct once 
  1567.    * this method returns. The reason for this is that by the time 
  1568.    * draw_self_local() is called, the clipping region corresponding to the 
  1569.    * bound of this object will have already been set and changing the bound 
  1570.    * then will not modify the clipping region accordingly (so the drawing may 
  1571.    * be incorrect).
  1572.    */
  1573.   public void configure();
  1574.  
  1575.   /*---------------------------------------------------------------------*/
  1576.   /* Picking */
  1577.   /*---------------------------------------------------------------------*/
  1578.  
  1579.   /**
  1580.    * Determine if the given point (in the local coordinates of this object)
  1581.    * is inside the extent of this object's normal bound.  You should <b>not</b>
  1582.    * normally override this routine to handle picking of non-rectangular
  1583.    * objects.  Do that in picked_by() instead.
  1584.    *
  1585.    * @see #picked_by
  1586.    * @param int pt_x x coordinate of the query point.
  1587.    * @param int pt_y y coordinate of the query point.
  1588.    * @return boolean indicating whether the point is inside the objects
  1589.    *                 bounding box.
  1590.    */
  1591.   public boolean inside_bounds(int pt_x, int pt_y);
  1592.  
  1593.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1594.  
  1595.   /**
  1596.    * Determine if the given point (in the local coordinates of this object)
  1597.    * is inside the extent of the object picking purposes.  Be default, this
  1598.    * method just checks the normal bound (bounding box), however, it can
  1599.    * be overridden to support accurate picking of non-rectangular objects.
  1600.    *
  1601.    * @see #inside_bounds
  1602.    * @param int pt_x x coordinate of the query point.
  1603.    * @param int pt_y y coordinate of the query point.
  1604.    * @return boolean indicating whether the point is inside the objects
  1605.    *                 bounding box.
  1606.    */
  1607.   public boolean picked_by(int pt_x, int pt_y);
  1608.  
  1609.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1610.  
  1611.   /**
  1612.    * Determine if this object and/or any of its decedent objects is "picked"
  1613.    * by the the given point.  If it is, it must add itself to the end of the
  1614.    * given given pick_collection by calling report_pick().  If not, it should
  1615.    * leave the pick_collector as is.<p>
  1616.    *
  1617.    * This method is also responsible for recursively invoking itself as
  1618.    * appropriate for its children (this is usually done using the
  1619.    * base_interactor.pick_within_children() utility routine).  By default we 
  1620.    * pick against any children first (since they are by default drawn last) 
  1621.    * and then this object.  However, if the drawing order is changed from the 
  1622.    * default, this method must be changed to reflect (the reverse of) that 
  1623.    * non-standard order.  For example, if this object does drawing both under 
  1624.    * and on top of its children, two sets of part specific tests would 
  1625.    * typically be needed, one before recursively picking the children, and one 
  1626.    * after.
  1627.    *
  1628.    * @see sub_arctic.lib.base_interactor#pick_within_children
  1629.    * @param int            pt_x      x coordinate of the query point.
  1630.    * @param int            pt_y      y coordinate of the query point.
  1631.    * @param pick_collector pick_list object that collects and returns pick
  1632.    *                                 results.
  1633.    */
  1634.   public void pick(int pt_x, int pt_y, pick_collector pick_list) ;
  1635.  
  1636.   /*---------------------------------------------------------------------*/
  1637.   /* Generic traversal support */
  1638.   /*---------------------------------------------------------------------*/
  1639.  
  1640.   /** 
  1641.    * Do a traversal of the interactor tree to collect nodes meeting some 
  1642.    * criteria (or perform actions on qualifying nodes).  Traversals are 
  1643.    * given a specialized "kind" so that subclasses can recognize and 
  1644.    * override behavior for certain traversals, while keeping default behavior 
  1645.    * for the rest.  In addition, several traversal orders are provided.  
  1646.    * Qualification for collection (or action) is done by an inclusion test 
  1647.    * predicate object.  This predicate is given the interactor in question 
  1648.    * as well as some (optional) data specific to the predicate.  This 
  1649.    * data is passed in from the root of the traversal and (optionally) 
  1650.    * transformed from parent to child values as the traversal proceeds.
  1651.    * Objects are collected (along with optional additional data) by adding
  1652.    * them to a pick_collector object. Recursive traversal is stopped when
  1653.    * either leaves are reached or the continue_test predicate for an 
  1654.    * interior node fails (in which case its children will not be visited).<p>
  1655.    *
  1656.    * Examples of possible traversals include:<br>
  1657.    * Replacement for the normal pick operation:<br>
  1658.    *  <pre>
  1659.    *    traverse_and_collect(pick_trav, TRAV_DRAW, pt_inside_bounds, pt_inside_bounds,
  1660.    *                         coord_parent_to_local, pick_pt, result);
  1661.    *  </pre>
  1662.    * and a tree dump:<br>
  1663.    *  <pre>
  1664.    *    traverse_and_collect(dump_trav, TRAV_PRE, dump_interactor, incr_int,
  1665.    *                         null, new Integer(0), result)
  1666.    *  </pre>
  1667.    * where dump_interactor printed to the node to System.out at the indentation
  1668.    * level of its Integer parameter, but always returns false
  1669.    *
  1670.    * @param traversal_kind   a unique integer (i.e., generated by 
  1671.    *                         manager.unique_int()) that represents the kind 
  1672.    *                         of traversal being performed.
  1673.    * @param traversal_order  one of TRAV_DRAW, TRAV_PICK, TRAV_PRE, or 
  1674.    *                         TRAV_POST indicating drawing order, pick order, 
  1675.    *                         left-to-right pre-order, or left-to-right 
  1676.    *                         post-order traversal.
  1677.    * @param inclusion_test   an interactor predicate object which is to 
  1678.    *                         perform the inclusion test for this traversal.  
  1679.    *                         If the traversal is being done for its action 
  1680.    *                         side-effects (rather than a collection, per se) 
  1681.    *                         then this object's test() method should perform
  1682.    *                         that action on selected nodes.  A null 
  1683.    *                         inclusion_test is treated as a function that 
  1684.    *                         selects everything (always returns true).
  1685.    * @param continue_test    an interactor_predicate object which determines 
  1686.    *                         if the given object's children are traversed.  
  1687.    *                         If this method returns false, then the children
  1688.    *                         will not be visited.  A null continue_test is 
  1689.    *                         is treated as a function that always returns 
  1690.    *                         true.
  1691.    * @param xform_parent_to_child object containing a method to transform the 
  1692.    *                          parameters data (passed to the inclusion_test)
  1693.    *                          from its parent condition to the condition 
  1694.    *                          suitable for use by a given child.  This can 
  1695.    *                          be used, for example, to transform a point from
  1696.    *                          the parent's coordinates into those of a child.
  1697.    *                          A null object is treated as the identity 
  1698.    *                          transformation (i.e. uses the parent's 
  1699.    *                          parameters directly for all children).
  1700.    *
  1701.    * @param parameters        the initial parameters data passed to the 
  1702.    *                          inclusion_test at the root, then transformed by 
  1703.    *                          xform_parent_to_child for recursive calls on 
  1704.    *                          children.
  1705.    * @param collection_result a pick_collector object which holds a list of 
  1706.    *                          interactors collected by this traversal (and 
  1707.    *                          optional associated data).  If an object 
  1708.    *                          determines that it should be a part of the 
  1709.    *                          collection of this traversal, it should add 
  1710.    *                          itself to this collection by calling its
  1711.    *                          report_pick() method.
  1712.    */
  1713.   public void traverse_and_collect(
  1714.     int             traversal_kind,
  1715.     int             traversal_order,
  1716.     interactor_pred inclusion_test,
  1717.     interactor_pred continue_test,
  1718.     traversal_xform xform_parent_to_child,
  1719.     Object          parameters,
  1720.     pick_collector  collection_result) ;
  1721.  
  1722.   /*---------------------------------------------------------------------*/
  1723.   /* Status */
  1724.   /*---------------------------------------------------------------------*/
  1725.  
  1726.   /**
  1727.    * Determine if a particular bit (or bits) is set in the flag set for the
  1728.    * interactor.  In the case of testing for multiple flag bits, they must
  1729.    * all be set to get a result of true.  See interactor_consts for
  1730.    * possible values that can be queried.
  1731.    *
  1732.    * @see sub_arctic.lib.interactor_consts
  1733.    * @param int mask_value the flag bit or bits we are enquiring about.
  1734.    * @return boolean indicating whether the bit or bits are (all) set.
  1735.    */
  1736.   public boolean flag_is_set(int mask_value);
  1737.  
  1738.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1739.  
  1740.   /** Determine if a particular bit (or bits) is set in the constraint_flag
  1741.    *  set for the interactor.  In the case of testing for multiple
  1742.    *  constraint_flag bits, they must all be set to get a result of true.
  1743.    *  See interactor_consts for possible values that can be queried.
  1744.    */
  1745.   public boolean constraint_flag_is_set(int mask_value);
  1746.  
  1747.   /*---------------------------------------------------------------------*/
  1748.   /* Output */
  1749.   /*---------------------------------------------------------------------*/
  1750.  
  1751.   /**
  1752.    * Do a trivial reject test that indicates whether the bounds of this object
  1753.    * are entirely outside the clipping region of the given drawable object.
  1754.    * The drawable object is assumed to be configured for our parent's
  1755.    * coordinate system.  Returns true if nothing inside our bounds will
  1756.    * survive the clip and hence need not be drawn.  This test is used in
  1757.    * draw_self() to avoid drawing anything for the object if none of it
  1758.    * could show up anyway.
  1759.    *
  1760.    * @see #draw_self
  1761.    * @param drawable  d            the drawable whose current clipping we are
  1762.    *                               testing against.
  1763.    * @param Rectangle bounding_box the bounding box we are comparing that with.
  1764.    */
  1765.   public boolean trivial_reject(drawable d);
  1766.  
  1767.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1768.  
  1769.   /**
  1770.    * Draw the object's current appearance.  The drawable object passed in
  1771.    * is still set up in the parent's coordinate system.  This routine normally
  1772.    * sets up the transformation for the local coordinate system, then calls
  1773.    * draw_self_local().  Consequently, most interactors do not override this
  1774.    * routine, but instead override base_interactor.draw_self_local().
  1775.    *
  1776.    * @see sub_arctic.lib.base_interactor#draw_self_local
  1777.    * @param drawable parent_d a drawable (still set up for the parent) to
  1778.    *                          produce output on.
  1779.    */
  1780.   public void draw_self(drawable d) ;
  1781.  
  1782.   /*---------------------------------------------------------------------*/
  1783.   /* Damage/redraw management */
  1784.   /*---------------------------------------------------------------------*/
  1785.  
  1786.   /**
  1787.    * Indicate that the object has been modified in such as way that its
  1788.    * appearance within the given area of the screen (expressed in local
  1789.    * coordinates) might change and needs to be redrawn.  This does not
  1790.    * update any attributes controlling size and position of this object
  1791.    * or any other object up the parent chain, but instead uses existing
  1792.    * values (reflecting the existing sizes and positions).  If you need to
  1793.    * damage this object's updated position, explicitly update it first.
  1794.    *
  1795.    * @param Point     top_left top left corner of the damaged rectangle.
  1796.    * @param Dimension sz           size of the damaged rectangle.
  1797.    */
  1798.   public void damage_self(Point top_left, Dimension sz) ;
  1799.  
  1800.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1801.  
  1802.   /**
  1803.    * Indicate that the object has been modified in such as way that its
  1804.    * appearance within the given area of the screen (expressed in local
  1805.    * coordinates) might change and needs to be redrawn.  This does not
  1806.    * update any attributes controlling size and position of this object
  1807.    * or any other object up the parent chain, but instead uses existing
  1808.    * values (reflecting the existing sizes and positions).  If you need to
  1809.    * damage this object's updated position, explicitly update it first.
  1810.    *
  1811.    * @param int left left edge of the damaged rectangle.
  1812.    * @param int top  top edge of the damaged rectangle.
  1813.    * @param int wid  width of the damaged rectangle.
  1814.    * @param int hi   height of the damaged rectangle.
  1815.    */
  1816.   public void damage_self(int left, int top, int wid, int hi) ;
  1817.  
  1818.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1819.  
  1820.   /**
  1821.    * Indicate that the object has been modified in such as way that any or
  1822.    * all of its appearance may change and its area of the screen needs
  1823.    * to be redrawn.
  1824.    *
  1825.    */
  1826.   public void damage_self() ;
  1827.  
  1828.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1829.  
  1830.   /**
  1831.    * Indicate that a change to a child (or grandchild, etc.) affects the
  1832.    * given screen region (expressed in the coordinates of this object).
  1833.    * This is responsible for passing damage up the tree.
  1834.    *
  1835.    * @param Point     top_left top left corner of the damaged rectangle.
  1836.    * @param Dimension sz           size of the damaged rectangle.
  1837.    */
  1838.   public void damage_from_child(Point top_left, Dimension sz) ;
  1839.  
  1840.   /*---------------------------------------------------------------------*/
  1841.   /* Feature points */
  1842.   /*---------------------------------------------------------------------*/
  1843.  
  1844.   /**
  1845.    * The number of "feature points" of an object.  Feature points are points
  1846.    * within an object which are interesting for alignment, snapping or
  1847.    * other purposes.  They are used by the move_drag and snap_drag agents.<p>
  1848.    *
  1849.    * Feature points are expressed in the local coordinates of the object in
  1850.    * question. Objects by default provide 5 points corresponding to their
  1851.    * corners and center.  Constants representing indexes for these standard
  1852.    * points are defined in interactor_consts.  Additional points with
  1853.    * specialized meanings may be provided by subclasses.
  1854.    *
  1855.    * @see sub_arctic.input.move_drag_focus_agent
  1856.    * @see sub_arctic.input.move_draggable
  1857.    * @see sub_arctic.input.move_drag_filter
  1858.    * @see sub_arctic.input.std_drag_filters
  1859.    * @see sub_arctic.input.snap_drag_agent
  1860.    * @see sub_arctic.input.snap_draggable
  1861.    * @see sub_arctic.input.snap_targetable
  1862.    * @see sub_arctic.lib.interactor_consts
  1863.    *
  1864.    * @return int the number of feature points this object has.
  1865.    */
  1866.   public int num_feature_points();
  1867.  
  1868.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1869.   
  1870.   /**
  1871.    * Access to the "feature points" of an object (by index).  Feature points
  1872.    * are points within an object which are interesting for alignment,
  1873.    * snapping or other purposes. They are used by the move_drag and
  1874.    * snap_drag agents. <p>
  1875.    *
  1876.    * Feature points are expressed in the local coordinates of the object in
  1877.    * question. Objects by default provide 5  points corresponding to their
  1878.    * corners and center.  Constants representing indexes for these standard
  1879.    * points are defined in interactor_consts.  Additional points with
  1880.    * specialized meanings may be provided by subclasses.  If an index out of
  1881.    * range is given the top-left corner (index FEATURE_TOP_LEFT which is
  1882.    * always 0,0) is returned.
  1883.    *
  1884.    * @see sub_arctic.input.move_drag_focus_agent
  1885.    * @see sub_arctic.input.move_draggable
  1886.    * @see sub_arctic.input.move_drag_filter
  1887.    * @see sub_arctic.input.std_drag_filters
  1888.    * @see sub_arctic.input.snap_drag_agent
  1889.    * @see sub_arctic.input.snap_draggable
  1890.    * @see sub_arctic.input.snap_targetable
  1891.    * @see sub_arctic.lib.interactor_consts
  1892.    *
  1893.    * @param int indx the index of the requested feature point.
  1894.    * @return Point the location of the requested feature point in local
  1895.    *               coordinates.
  1896.    */
  1897.   public Point feature_point(int indx);
  1898.  
  1899.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1900.   
  1901.   /**
  1902.    * Indicate whether the indicated "feature point" of an object is
  1903.    * considered to be enabled.  Feature points are points within an object
  1904.    * which are interesting for alignment, snapping or other purposes. They are
  1905.    * used by the move_drag and snap_drag agents. <p>
  1906.    *
  1907.    * Feature points are expressed in the local coordinates of the object in
  1908.    * question. Objects by default provide 5 points corresponding to their
  1909.    * corners and center.  Constants representing indexes for these standard
  1910.    * points are defined in interactor_consts.  Additional points with
  1911.    * specialized meanings may be provided by subclasses. <p>
  1912.    *
  1913.    * By default all standard feature points are always enabled. If an index
  1914.    * out of range is given false will always be returned.
  1915.    *
  1916.    * @see sub_arctic.input.move_drag_focus_agent
  1917.    * @see sub_arctic.input.move_draggable
  1918.    * @see sub_arctic.input.move_drag_filter
  1919.    * @see sub_arctic.input.std_drag_filters
  1920.    * @see sub_arctic.input.snap_drag_agent
  1921.    * @see sub_arctic.input.snap_draggable
  1922.    * @see sub_arctic.input.snap_targetable
  1923.    * @see sub_arctic.lib.interactor_consts
  1924.    *
  1925.    * @param int indx the index of the feature point in question.
  1926.    * @return boolean indicating whether it is enabled.
  1927.    */
  1928.   public boolean feature_point_enabled(int indx);
  1929.  
  1930.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1931.   
  1932.   /** Indicate the current "feature point" of an object.  This point will be
  1933.    * used by the move_drag agent to control dragging. Feature points are
  1934.    * points within an object which are interesting for alignment, snapping
  1935.    * or other purposes. The current feature point is used by the move_drag
  1936.    * agent.  See that agent for complete details.
  1937.    *
  1938.    * Feature points are expressed in the local coordinates of the object in
  1939.    * question. Objects by default provide 5 points corresponding to their
  1940.    * corners and center.  Constants representing indexes for these standard
  1941.    * points are defined in interactor_consts.  Additional points with
  1942.    * specialized meanings may be provided by subclasses. <p>
  1943.    *
  1944.    * Note: this routine and the ones that use it ignore the enable status
  1945.    * of the point as returned by feature_point_enabled().  This routine
  1946.    * defaults to the top left corner of the object.
  1947.    *
  1948.    * @see sub_arctic.input.move_drag_focus_agent
  1949.    * @see sub_arctic.input.move_draggable
  1950.    * @see sub_arctic.input.move_drag_filter
  1951.    * @see sub_arctic.input.std_drag_filters
  1952.    * @see sub_arctic.lib.interactor_consts
  1953.    *
  1954.    * @return the index of the current feature point.
  1955.    */
  1956.   public int drag_feature_point();
  1957.  
  1958.   /*---------------------------------------------------------------------*/
  1959.   /* User Info */
  1960.   /*---------------------------------------------------------------------*/
  1961.  
  1962.   /**
  1963.    * Access to uninterpreted "user information" that we are holding for the
  1964.    * user of this object.  This information is for use of the user or
  1965.    * application only and is typically used to associated application specific
  1966.    * information with a particular interactor object.  This information can be
  1967.    * entered using set_user_info().  It is not modified by the toolkit, and
  1968.    * can later be retrieved with this routine as needed.
  1969.    *
  1970.    * @see #set_user_info
  1971.    * @returns Object the user info object attached to this interactor.
  1972.    */
  1973.   public Object user_info();
  1974.   
  1975.   /**
  1976.    * Set the uninterpreted "user information" that we are holding for the
  1977.    * user of this object.  This information is for use of the user or
  1978.    * application only and is typically used to associated application specific
  1979.    * information with a particular interactor object.  This information can be
  1980.    * entered using this routine.  It is not modified by the toolkit, and can
  1981.    * later be retrieved with user_info() as needed.
  1982.    *
  1983.    * @see #user_info
  1984.    * @param Object user_inf the object to associate with this interactor.
  1985.    */
  1986.   public void set_user_info(Object user_inf);
  1987.  
  1988.   /*---------------------------------------------------------------------*/
  1989.   /* Debugging */
  1990.   /*---------------------------------------------------------------------*/
  1991.  
  1992.   /**
  1993.    * Convert to a human readable string.
  1994.    * @return String a human readable dump of the object.
  1995.    */
  1996.   public String toString();
  1997.  
  1998.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  1999.  
  2000.   /**
  2001.    * Convert to a small tag string which indicates the type of interactor
  2002.    * along with a (hopefully unique) integer (its hashCode) that can
  2003.    * be used to identify it during debugging.
  2004.    * @return String an terse identifying tag string for the object.
  2005.    */
  2006.   public String tag_str();
  2007.  
  2008.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  2009.   /* STYLECHANGE_IGNORE_STOP */
  2010.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  2011. }
  2012.  
  2013. /*======================= TERMS AND CONDITIONS OF USE ====================
  2014.  
  2015. This file is part of the subArctic user interface toolkit.
  2016.  
  2017. Copyright (c) 1996 Scott Hudson and Ian Smith
  2018. All rights reserved.
  2019.  
  2020. Permission is hereby granted, without written agreement and without license 
  2021. or royalty fees, to use, copy, modify, and distribute this software in 
  2022. executable form for any purpose, and permission is also granted, to use, 
  2023. copy, and modify, redistribute for personal and internal use only (but not 
  2024. redistribute for profit) this software in source form, provided that the 
  2025. above copyright notice and this notice appears in all copies of this software, 
  2026. that this copyright appears in all supporting documentation, and that the 
  2027. name, logo, or any other symbol of the Georgia Institute of Technology or 
  2028. other employers of the authors or contributors is not be used in advertising 
  2029. or publicity pertaining to distribution of this software except in conjunction 
  2030. with these notices.  
  2031.  
  2032. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS, OR THEIR EMPLOYERS BE LIABLE TO 
  2033. ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 
  2034. ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION (INCLUDING, BUT 
  2035. NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
  2036. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
  2037. OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
  2038. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
  2039. EVEN IF THE AUTHORS, CONTRIBUTORS, OR THEIR EMPLOYERS HAVE BEEN ADVISED OF THE 
  2040. POSSIBILITY OF SUCH DAMAGE.
  2041.  
  2042. THE AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED 
  2043. TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
  2044. PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE 
  2045. AUTHORS AND THEIR EMPLOYER HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 
  2046. UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  2047.  
  2048. These terms of use are subject to change in future version and releases.
  2049.  
  2050. The current release and additional information about this software can be 
  2051. found starting at:
  2052. http://www.cc.gatech.edu/gvu/ui/sub_arctic/
  2053.  
  2054. ========================================================================*/
  2055.